#include <stdio.h>
int main(int argc, char const *argv[])
{
    int times = 0;
    int number;
    int total = 0;

    printf("total = %d\n", total);
    while (total < 5000)
    {
        printf("请输入一个正整数：");
        scanf("%d", &number);
        total += number;
        times += 1;
        printf("number=%d, times=%d, total=%d\n", number, times, total);
    }

    printf("总共输入的次数：%d，总和为：%d\n", times, total);

    return 0;
}
